﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfApplyRefund.aspx.cs" Inherits="msBsc.WebUi.wMall.Seller.wfApplyRefund" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>地接客_退款详情</title>
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sHead.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sFoot.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/usermenu.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/from.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/pagination.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/orderlist.css" rel="stylesheet" />
    <link href="/jqPlugin/layer/skin/layer.css" rel="stylesheet" />

    <link href="/themes/wStyle1/css/Chat/layim.css" rel="stylesheet" />
</head>
<body>
    <div class="wf_all">
        <div id="divLoginInfo">
            <%=msBsc.WebUi.Code.QtHtmlGet.GetHeaderLoginInfo() %>
        </div>
        <div class="main-container">
            <div class="sidebar-scroll noborder">
                <%=msBsc.WebUi.Code.QtHtmlGet.GetDjackMenuHtml() %>
            </div>
            <div class="main-Info">
                <div class="tnavigation">
                    <a class="nav" href="#">首页</a>&gt;
				<a class="nav" href="#">订单管理</a>&gt;
				<a class="nav-on" href="#">我的订单</a>
                    <div class="tinfo right">
                        <span>下单时间：<em id="ordr_time"></em></span>
                        <span>订单号:<em id="order_code"></em></span>
                    </div>
                </div>

                <div id="detailInfo">
                    <p style="width: 200px; margin-left: 30px;" class="car-price">没有任何数据信息...</p>
                </div>
                <xmp id="svc_list_temp_order" style="display: none">
                      <table class="table-info">
                        <thead class="table-head">
                            <tr>
                                <th class="w2">名称</th>
                                <th class="w2">时间</th>
                                <th>车辆价总价(元)</th>
                            </tr>
                        </thead>
                        <tbody class="user-body">
                            <tr class="tr-one">
                                <td class="w2">
                                    <div class="user-tag">
                                        <div><a href="#">{{d.rows[0].CUSTOMER_NICK}}</a></div>
                                         <span onclick="chatShow(this);"  style="cursor:pointer;color:#ff6a00;" lg="true" 
                                        userid="{{d.rows[0].CUSTOMER_REGISTER_ID}}" 
                                        username="{{d.rows[0].CUSTOMER_NICK}}" userface="{{d.rows[0].CUSTOMER_DEFAULT_PIC}}" >
                                            <img src="/themes/wStyle1/Images/Chat/contact.gif" alt="在线咨询" />
                                        </span>
                                    </div>
                                    <img class="user-img" alt="用户头像" src="{{d.rows[0].CUSTOMER_DEFAULT_PIC}}" />
                                </td>
                                <td>{{formatDate1(new Date(d.rows[0].ORDER_START_TIME))}}-{{formatDate1(new Date(d.rows[0].ORDER_STOP_TIME))}}</td>
                                <td>
                                    <p id="price_sum" class="unit-price">￥{{d.rows[0].PAYABLE_AMT}}</p>
                                    <%--<span  class="tm-btn tm-skin-yellow">待确认</span>--%>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <input type="hidden" id="ordr_time_temp" value="{{formatDate1(new Date(d.rows[0].ORDER_TIME))}}" />
                    <input type="hidden" id="order_code_temp" value="{{d.rows[0].ORDER_CODE}}" />
                        <table class="table-info m-top1">
                        <thead class="table-head">
                            <tr>
                                <th>车辆</th>
                                <th class="w5"></th>
                                <th>单价(元/天)</th>
                            </tr>
                        </thead>
                        <tbody class="car-body">
                           {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                                <tr>
                                    <td><a href="/wp_VehicleInfo.htm?vehicleId={{d.rows[i].PRODUCT_ID}}" target="_blank">
                                        <img class="car-img" src="{{d.rows[i].IMG_URL}}"></a>
                                    </td>
                                    <td class="car-info">
                                        <p>{{d.rows[i].PRODUCT_NME}}</p>
                                        <%--<p>颜色：<span>红配黑色</span></p>
                                        <p>车牌号：<span>渝V9999</span></p>--%>
                                    </td>
                                    <td class="center-text">
                                        <p class="car-price">￥{{d.rows[i].PRODUCT_STRIKE_PRICE}}</p>
                                        <p class="center-text">优惠 ￥<span>{{d.rows[i].DISCOUNT_AMT}}</span></p>
                                       
                                    </td>
                                </tr>
                           {{#} }}
                        </tbody>
                    </table>
                   </xmp>
                <div class="zuihou">
                    <div class="zuihou-right" id="Operation">
                    </div>
                    <xmp id="XmpOperation" style="display: none">
                        <div class="zuihou-submit">
                            <span class="up-btn tm-skin-yellow" onclick="noPrice('{{d.rows[0].ORDERS_INFO_ID}}');">拒绝退款</span>
                            <span class="up-btn tm-skin-red" onclick="submitData()">确认退款</span>
                        </div>
                        <div class="zuihou-info text-right" >
                            <p><span class="car-price">定金比例:</span><span>{{d.rows[0].DEPOSIT_RATIO*100}}%</span></p>
                             <p>订单总价:<span  class="car-price">￥{{d.rows[0].ORDER_TOTAL_BALANCE}} (共{{d.rows[0].PRODUCT_QTY}}天)</span>
                                &nbsp;&nbsp;优惠:<span  class="zuihou-price">￥ {{d.rows[0].DISCOUNT_AMT}}</span>
                             </p>
                            <p>
							应付总价:<span class="car-price">
                                        ￥{{(d.rows[0].ORDER_TOTAL_BALANCE-d.rows[0].DISCOUNT_AMT).toFixed(2)}}</span>&nbsp;&nbsp;
                            应付定金:<span  class="zuihou-price">￥{{d.rows[0].PAYABLE_AMT}}</span>
                            </p>
                        </div>
                     </xmp>
                    <div style="width: 260px; padding-top: 50px; padding-left: 15px;">
                        <p><span class="car-price">注：应付定金=(应付总价-优惠价格) x 定金比例</span></p>
                    </div>
                </div>
                <div id="refuseView" style="margin-top: 10px; display: none">
                    <div style="height: 45px;">
                        <span class="tm-skin-red btn-message">退款理由</span>
                        <span class="arrow-right" style="float: left"></span>
                    </div>
                    <div style="height: 50px;">
                        <span style="font-size: 18px; color: red">原因：</span>
                        <span style="font-size: 15px;" id="RefuseMessage"></span>
                    </div>
                </div>
                <div style="margin-top: 10px;">
                    <h2 style="line-height: 24px;">一、申请条件</h2>
                    <div style="text-indent: 22pt; line-height: 20px; font-size: 14px;">
                        1、出发日15天前，买家可申请无理由退款。买家提出退款申请后，7个工作日内，地接客平台将买家支付的定金全额返还到买家提现账户。
                    </div>
                </div>
                <div style="margin-top: 10px;">
                    <div style="text-indent: 22pt; line-height: 20px; font-size: 14px;">
                        2、在订单生效后，出发日15天内,由于卖家原因，不能提供订单上指定的旅游服务时，卖家违约。由买家提出申请，卖家同意后，地接客平台将扣取卖家200元保证金，并将买家已支付的定金全额返还到买家提现账户。

                    </div>
                </div>
                <div style="margin-top: 10px;">
                    <div style="text-indent: 22pt; line-height: 20px; font-size: 14px;">3、在订单生效后，出发日15天内，由于买家原因，不能接受订单上指定的旅游服务时，买家违约。此种情况下，地接客平台按正常交易情况处理，平台将会在服务结束时间后7个工作日内，扣取买家定金的5%手续费后，将剩余定金支付到卖家提现账户。</div>
                </div>
            </div>
        </div>
        <%--chat--%>
        <script src="/themes/wStyle1/js/Chat/lib.js"></script>
        <script src="/themes/wStyle1/js/Chat/layim.js"></script>
        <!--start JS引用-->
        <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
        <script src="/jqPlugin/js/jBase.js"></script>
        <script src="/jqPlugin/js/jBPage.js"></script>
        <script src="/jqPlugin/js/laytpl.js"></script>
        <script src="/jqPlugin/layer/layer.min.js"></script>

        <script src="/jqPlugin/SelectSimu/js/SelectSimu.js"></script>
        <script src="/themes/wStyle1/js/comm/jsLayout.js"></script>
        <script src="/themes/wStyle1/js/comm/DateInfo.js"></script>
        <script type="text/javascript">
            $(function () {

            })

            //拒绝退款
            function noPrice(orderid) {
                var t = this;
                $.layer({
                    title: ['请填写拒绝理由，为什么呢？', true],
                    shade: [0.5, '#000', true],
                    area: ['auto', 'auto'],
                    dialog: {
                        msg: '<textarea id="message" style="width:320px;height:130px;"></textarea>',
                        btns: 2,
                        type: 4,
                        btn: ['残忍拒绝', '我再想想'],
                        yes: function (s) {
                            var msg = $("#message").val();
                            var reg = /\S/;
                            if (reg.test(msg)) {
                                layer.load('正在为你传达,请稍后', 2);
                                stServer_Refund(orderid, msg);
                            }
                            else {
                                layer.tips('为什么呢？', $("#message"), { guide: 0, time: 2 });
                            }
                        },
                        no: function () { }
                    }
                });
            }

            //成功效果
            function success(orderid) {
                layer.alert('操作成功', 1);
                setTimeout(function () {
                    location.href = "/ws_OrderInfo.htm?orderId=" + orderid;
                }, 2000);
            }

            //拒绝 提交
            function stServer_Refund(orderid, msg) {
                var opart = new jsonRow();
                opart.AddCell("message", msg);
                opart.AddCell("orderId", orderid);
                opart.AddCell("ACTION", "refund");
                ajaxComm(opart);
            }
            //确认提交
            function submitData() {
                $.layer({
                    shade: [0.5, '#000', true],
                    area: ['auto', 'auto'],
                    dialog: {
                        msg: '你确定要退还金额吗？',
                        btns: 2,
                        type: 4,
                        btn: ['确认', '取消'],
                        yes: function () {
                            layer.load('正在提交,请稍后', 2);
                            //提交服务器
                            var opart = new jsonRow();
                            opart.AddCell("orderId", GetQueryStr("orderId"));
                            opart.AddCell("ACTION", "okRefund");
                            ajaxComm(opart);

                        }, no: function () { }
                    }
                });
            }

            function setStatus(status) {
                var st = parseInt(status);
                var statushtml = "";
                switch (st) {
                    case 1:
                        statushtml += '<span class="tm-btn tm-skin-yellow">待确认</span>';
                        break;
                    case 2:
                        statushtml += '<span class="tm-btn tm-skin-yellow">待付款</span>';
                        break;
                    case 12:
                        statushtml += '<span class="tm-btn tm-skin-red">已拒绝</span>';
                        break;
                    case 3:
                        statushtml += '<span class="tm-btn tm-skin-greem">已支付</span>';
                        break;
                    case 4:
                        statushtml += '<span class="tm-btn tm-skin-greem">已完成</span>';
                        break;
                    case 6:
                        statushtml += '<span class="tm-btn tm-skin-red">申请退款</span>';
                        break;
                    case 7:
                        statushtml += '<span class="tm-btn tm-skin-Grey">已退款</span>';
                        break;
                    case 8:
                        statushtml += '<span class="tm-btn tm-skin-Grey">已取消</span>';
                        break;
                    case 9:
                        statushtml += '<span class="tm-btn tm-skin-Grey">已删除</span>';
                        break;
                    case 11:
                        statushtml += '<span class="tm-btn tm-skin-red">已拒绝退款</span>';
                        break;
                    case 13:
                        statushtml += '<p class="skin-greem">已退款</p>';
                        break;
                }
                $("#price_sum").parent().append(statushtml);

                setOrderCode();
            }

            function btnDo(sEbtn) {
                var opart = new jsonRow();
                opart.AddCell("orderId", GetQueryStr("orderId"));
                opart.AddCell("ACTION", sEbtn);
                ajaxComm(opart);
            };
            btnDo("init");

            function setOrderCode() {
                $("#order_code").html($("#order_code_temp").val());
                $("#ordr_time").html($("#ordr_time_temp").val());
            }

            //计算价格 定 下
            function jisuan(sum, dAtm, bili, isshenyu) {
                var sum1 = parseFloat(sum);
                var dAtm1 = parseFloat(dAtm);
                var bili1 = parseFloat(bili);

                var dingjin = ((sum1 - dAtm1) * bili).toFixed(2);
                //剩余金额
                var iss = parseInt(isshenyu);
                if (iss > 0) {
                    return (sum1 - dingjin);
                }
                return dingjin;
            }
        </script>
        <script src="/themes/wStyle1/js/Chat/chatMessage.js"></script>
        <%=msBsc.WebUi.Code.QtHtmlGet.GetFloorHtml() %>
    </div>
</body>
</html>
